import apiRequest from "../common/apiRequest";

//获取首页菜单
const getMenus = (params) => {
	return apiRequest({
		url: '/source/home/getMenus',
		method: 'post',
		data: params
	})
}

//获取站点机房列表
const getSiteOverallList = (data) => {
	return apiRequest({
		url: `/source/siteOverall/list`,
		method: 'post',
		data
	})
}

//获取站点机房详情页面
const getSiteOverallDetail = (data) => {
	return apiRequest({
		url: `/source/siteOverall/detail`,
		method: 'post',
		data
	})
}

//获取设备选项
const getOption = (data) => {
	return apiRequest({
		url: `/source/common/getOption`,
		method: 'post',
		data,
	})
}

//获取设备归属
const getOtherOption = (data) => {
	return apiRequest({
		url: `/source/common/getOtherOption`,
		method: 'post',
		data,
	})
}

//获取设备管理列表
const getdeviceOverall = (data) => {
	return apiRequest({
		url: `/source/deviceOverall/list`,
		method: 'post',
		data
	})
}

//获取设备详情
const getdeviceOverallDetail = (data) => {
	return apiRequest({
		url: `/source/deviceOverall/detail`,
		method: 'post',
		data
	})
}

// 设备对应的光路列表
const getListOfDevice = (data) => {
	return apiRequest({
		url: `/source/lightPathOverall/getListOfDevice`,
		method: 'post',
		data
	})
}

// 设备对应的光路列表详情
const getListOfDeviceDetail = (data) => {
	return apiRequest({
		url: `/source/lightPathOverall/getDetail`,
		method: 'post',
		data
	})
}

// 获取巡视照片
const getPicture = (data) => {
	return apiRequest({
		url: `/source/deviceOverall/getPicture`,
		method: 'post',
		data
	})
}

// 设备所对应的业务列表
const getListOfDeviceBusiness = (data) => {
	return apiRequest({
		url: `/source/businessOverall/getListOfDevice`,
		method: 'post',
		data
	})
}

// 通信光缆
const getopticalCableOverall = (data) => {
	return apiRequest({
		url: `/source/opticalCableOverall/list`,
		method: 'post',
		data
	})
}

// 光缆承载光路
const getLightpathListByFibre = (data) => {
	return apiRequest({
		url: `/source/fiberCoreOverall/getLightpathListByFibre`,
		method: 'post',
		data
	})
}


// 通信光缆详情
const getCableOverallDetail = (data) => {
	return apiRequest({
		url: `/source/opticalCableOverall/getDetail`,
		method: 'post',
		data
	})
}

// 纤芯使用
const getFibreCoreList = (data) => {
	return apiRequest({
		url: `/source/fiberCoreOverall/getFibreCoreList`,
		method: 'post',
		data
	})
}

// 纤芯详情
const getFiberCoreOverall = (data) => {
	return apiRequest({
		url: `/source/fiberCoreOverall/getDetail`,
		method: 'post',
		data
	})
}

// 获取纤芯使用情况
const getFibreCoreCount = (data) => {
	return apiRequest({
		url: `/source/fiberCoreOverall/getFibreCoreCount`,
		method: 'post',
		data
	})
}

// 光路管理
const getLightPathOverall = (data) => {
	return apiRequest({
		url: `/source/lightPathOverall/list`,
		method: 'post',
		data
	})
}

// 光缆站点饼状图
const getPieChart = (data) => {
	return apiRequest({
		url: `/source/opticalCableOverall/getPieChart`,
		method: 'post',
		data
	})
}

export default {
	getSiteOverallList,
	getOption,
	getdeviceOverall,
	getSiteOverallDetail,
	getdeviceOverallDetail,
	getPicture,
	getOtherOption,
	getopticalCableOverall,
	getListOfDevice,
	getListOfDeviceDetail,
	getLightPathOverall,
	getCableOverallDetail,
	getFibreCoreList,
	getFibreCoreCount,
	getFiberCoreOverall,
	getLightpathListByFibre,
	getListOfDeviceBusiness,
	getPieChart,
	getMenus
}